<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo"
>
<head th:replace="~{/common/template :: header(~{::title},~{::link},~{::style})}">
    <link rel="stylesheet" th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
</head>
<body class="timo-layout-page">
<div class="layui-card">

    <div class="layui-card-body">
        <div class="layui-row timo-card-screen put-row">
            <div class="pull-left layui-form-pane timo-search-box">


                <div class="layui-inline">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block">
                        <input type="text" name="username" th:value="${param.username}" placeholder="请输入用户名"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                    <button class="layui-btn timo-search-btn">
                        <i class="fa fa-search"></i>
                    </button>
                </div>
            </div>

        </div>
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="timo-table-checkbox">
                        <label class="timo-checkbox"><input type="checkbox">
                            <i class="layui-icon layui-icon-ok"></i></label>
                    </th>
                    <th class="sortable" data-field="username">用户名</th>
                    <th class="sortable" data-field="nickname">时间</th>
                    <th class="sortable" data-field="dept">头像</th>
                    <th class="sortable" data-field="sex">IP</th>
                    <th class="sortable" data-field="phone">设备类型</th>
                    <th class="sortable" data-field="email">当前channel</th>
                    <th class="sortable" data-field="createDate">命名空间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                        <i class="layui-icon layui-icon-ok"></i></label></td>
                    <td th:text="${item.name}">用户名</td>
                    <td th:text="${item.time}"></td>

                    <td th:text="${item.avatarUrl}"></td>
                    <td th:text="${item.ip}"></td>
                    <td th:text="${item.deviceType}"></td>
                    <td th:text="${item.currId}"></td>
                    <td th:text="${item.nameSpace}"></td>


                  <!--  <td th:text="${#dates.format(item.createDate, 'yyyy-MM-dd HH:mm:ss')}"></td>-->

                    <td>

                        <a class="ajax-get" th:attr="data-msg='您是否删除'+${item.name}"
                           th:href="@{/user/status/delete(ids=${item.id})}"
                           >删除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
 <div th:replace="~{/common/fragment :: page}"></div>
    </div>
</div>
<script th:replace="~{/common/template :: script}"></script>
<script type="text/javascript" th:src="@{/js/plugins/jquery-2.2.4.min.js}"></script>
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
<script type="text/javascript">
    var local = window.localStorage;
    // 树形菜单
    $.fn.selectTree({
        rootTree: '全部',
        onSelected: function (treeNode) {
            local.setItem('deptTitle', treeNode.name);
        }
    });
</script>
</body>
</html>